package edu.ynmd.BMI.dao;

import edu.ynmd.BMI.model.Area;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface AreaDao extends JpaRepository<Area,String>{

    @Query("select a from Area a where a.code =:areacode")
    public List<Area> getAreasByCode(@Param("areacode")String areacode);


}
